package BO;

import java.util.ArrayList;

import View.OrderItemView;

import DB.OrderDB;


public class OrderItem {
	private Item item;
	private int amount;

	public OrderItem(Item item, int amount){
		this.item = item;
		this.amount = amount;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public Item getItem() {
		return item;
	}
		
	@Override
	public String toString() {
		return "OrderItem [item=" + item + ", amount=" + amount + "]";
	}

	public static boolean orderStuffs(ArrayList<OrderItemView> items, int userId){
		return OrderDB.orderStuffs(items, userId);
	}
	public static void packOrder(int orderId){
		OrderDB.packOrder(orderId);
	}
	public static ArrayList<Order> getAllUnpackedOrders(){
		return OrderDB.getAllUnpackedOrders();
	}
	
	public static ArrayList<Order> getAllOrderFromUser(int userId){
		return OrderDB.getAllOrderFromUser(userId);
	}

}
